﻿================================================================================
============================

			MasTouch AcousticWave Touchscreen serial interface
                      README file for touchscreen software for XFree86[tm] 4.0.x


			        	Version 2.00
                     Copyright 2003-2004 JingGe Computer Science&Technology co.,Ltd.

================================================================================
============================

Thank you for choosing our RS232,AcousticWave Touchscreen products!! This README
 file contains
additional notes about our touchscreen software which,we think,will help you
 make better use of
our touchscreen and touchscreen software.

NOTE: The Quick start method uses pre-built files.The calibration tool and
 driver were built and tested on a Linux 2.4.17 kernel and XFree86 4.0.0. They
 have downward compatibility.

===========
CONTENTS
===========
1.QuickStart Guide for touch screen driver and calibration utility
2.Valid entries for each of the lines in the subsection
3.Software Component
4.Problem solution

==================================================================
1.QuickStart Guide for touch screen driver and calibration utility
==================================================================

1) The controller needs to be attached to a serial port and you need to know
 that serial ports name.

2)Install the files
   Login as root.Then
   * Copy Mastouch_drv.o to /usr/X11R6/lib/modules/input(use "cp Mastouch_drv.o
 /usr/X11R6/lib/modules/input" for RedHat 7.2)
   * Copy Mascal to /usr/local/bin (or another directory(use "cp Mascal
 /usr/local/bin")
     in your PATH

3)Edit your XF86Config to enable touch screen support.(use "vi
 /etc/X11/XF86Config-4" or "vi /etc/X11/XF86Config")
    Add
        Inputdevice    "touchscreen1" "SendCoreEvents"
    in  Section "ServerLayout"

    For each device identified in the "ServerLayout" section, a corresponding
 subsection should exist in the "Inputdevice" section.So let's create the
 section.
  	Section "Inputdevice"
     		Identifier "touchscreen1"
      		Driver "Mastouch"
      		Option "Device" "/dev/ttyS0"
      		Option "AlwaysCore"
      		Option "screenno" "0"
      		Option "MinX" "1176"
      		Option "MaxX" "3671"
      		Option "MinY" "578"
      		Option "MaxY" "2493"
      		Option "UntouchDelay" "3"
      		Option "ReportDelay" "1"
       	EndSection


   Finally,replace the serial ports name "/dev/ttyS0" with yours.Fill the
 calibration data in.

4) Start your XFree86 server.

5) Calibrate your touchscreen(use "Mascal /dev/ttyS0"--ttyS0 for COM1,ttyS1 for
 COM2 etc.)
    Run "Mascal" and follow the program you will get your calibration data.
    Those data will store into /tmp/cal.txt,too.
   Change the calibration data in XF86Config-4(or XF86Config).

6) ReStart your XFree86 server to make the calibration take effect.


That's All!

========================================================================
2.Valid entries for each of the lines in the subsection are as follows :
========================================================================
Device
    	- identifies the serial port to which the controller is attached
	- use "/dev/ttyS0" for com port 1 or "/dev/ttyS1" for com port 2
ScreenNo
	- in a multi-monitor system, identifies which monitor the touchscreen is
 mounted on.
	- use 0 for a single monitor system
TouchMode
	- use 0 for NORMAL_MODE
	- use 1 for CLICK_ON_TOUCH_MODE
	- use 2 for CLICK_ON_RELEASE_MODE
AlwaysCore
	- enables sharing of the core pointer (you want to do this)
	- does not require any parameters
MaxX
	- used in conjunction with the MinimumXPosition value to calibrate the X axis
 of the touchscreen
	- try an initial value of 3680
MinX
	- used in conjunction with the MaximumXPosition value to calibrate the X axis
 of the touchscreen
	- try an initial value of 1180
MaxY
	- used in conjunction with the MinimumYPosition value to calibrate the X axis
 of the touchscreen
	- try an initial value of 2480
MinY
	- used in conjunction with the MaximumYPosition value to calibrate the X axis
 of the touchscreen
	- try an initial value of 580
SwapXY	
	- used to switch the touchscreen orientation 90 degrees
	- omit this line if not required
HistorySize
	- sets the motion history size
	- set to 0
	


2.Software Component
=======================
Our Touchscreen Software package is composed of the following programs:

          Mastouch_drv.o             Our Touchscreen driver for XFree86.

          Mascal                    Our touchscreen calibration program.

	  README.txt                 It's me!


=====================
3.Problem solution
=====================
1)Permission denied:
  Login to the system console as root and do it again.
2)Can't exit to a text console:
  If your system is running in graphics mode,you must exit to a text console
 prompt first.If your system is set up to automatically start the X window
 system at boot time an provide a praphical login screen,you will need to shut
 down the window system display manager.On many Linux systems,this can be
 accomplished by running the command:
   #init 3
   If this does not work,you will need to locate and kill the display manager
 process,which is usually one of:xdm,gdm,kdm,or prefdm.
3)To verify that the touchmonitor is connected correctly to the PC and that it
 is functioning correctly, type the following command in an X terminal window:

   od -h -w10 </dev/ttyS0 — for COM1
   od -h -w10 </dev/ttyS1 — for COM2

Touch the screen and you should see a group of numbers scrolling down the
 screen.
4)If you are using XFree86 version 3.x
The calibration tool and driver were built and tested on a Linux 2.4.7 kernel
 and XFree86 4.1.0.Contact us to get an earlier one.
5)Sometime the calibration tool doesn't work well.
The calibration tool only support 80*25, based on text mode now, and we should
 provide you another one based on graphics mode soon.
6)Not the above
You can email /var/log/XFree86.0.log and /etc/X11/XF86Config-4 to us,then we can
 find the problem for you.
NOTES:
   With any notion,advice,demands,
   Contact us.

================================================================================
==============================

                                   JingGe Computer Science&Technology co.,Ltd.

  				 http://www.MasTouch.com

                                   All rights reserved.

================================================================================
==============================
      
